function baseline=baseline_f(act,cur_frame_times,aux_data,velM_ind,nbr_frames,bas_exp)
base_run=velM_ind(cur_frame_times);
count=[1:length(cur_frame_times)];
bas_curframe=count(cur_frame_times>bas_exp);
bas_curframe=min(bas_curframe);

base_act=act;
base_act(1:bas_curframe-1)=[];
base_run(1:bas_curframe-1)=[];
baseline=base_act(base_run==0);
baseline=median(baseline);
